'use client';

import { Button } from '@/components/ui/button';
import Link from 'next/link';

export default function ErrorPage({
  error,
  reset,
}: {
  error: Error & { digest?: string };
  reset: () => void;
}) {
  return (
    <div className="h-screen flex flex-col gap-5 items-center justify-center">
      <h2>出错了</h2>
      <div className="flex gap-5">
        <Link href="/">
          <Button>回到首页</Button>
        </Link>
        <Button onClick={() => reset()}>重试</Button>
      </div>
    </div>
  );
}
